User:Cobalt32/sandbox
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Contents
Packet structure
A Reticulum packet consists of four fields: a header field, destination field, context field, and data field. There is no source field, as packets do not include sender information.
| Offset | Octet | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Octet | Bit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
| 0 | 0 | AC | HT | CF | PT | DT | DT | PT | PT | Hops | Hops | Hops | Hops | Hops | Hops | Hops | Hops | | | | | | | | | | | | | | | | |
| 4 | 32 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| 8 | 64 | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination | Destination |
| 12 | 96 | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| 16 | 128 | | | | | | | | | | | | | | | | | Context | Context | Context | Context | Context | Context | Context | Context | | | | | | | | |
| 20 | 160 | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data |
| 24 | 192 | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data |
| ⋮ | ⋮ | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data | Data |
Access Codes: 1 bit
Set to 1 if the interface has IFAC enabled.
Header Type: 1 bit
Indicates the number of destination hashes included in the destination field. Set to 0 for a single 16-byte hash. Set to 1 for two 16-byte hashes.
Context Flag: 1 bit
The context flag is used for various types of signaling, depending on packet context.
Propagation Type: 1 bit
Set to 0 for broadcast propagation. Set to 1 for transport propagation.
Destination Type: 2 bits
Indicates the destination type. Set to 00 for single destination, 01 for group destination, 10 for plain destination, and 11 for link destination.
Packet Type: 2 bits
Hops: 8 bits
Set to 0 when sent and incremented whenever the packet is forwarded by a transport node. When a transport node receives a packet with the hops field greater than or equal to the node's maximum hop count, the packet is not forwarded. The default maximum hop count is currently 128.
Destination: 16 bytes (128 bits)
The destination hash of the intended recipient. If the header type is set to 1, there are two 16-byte destination fields.
Context: 8 bits
Used to determine packet context.
Data: Variable
The payload of the packet.
CSS
The following CSS should make the header diagram usable by adding vertical lines, reducing the padding, and changing some colors. This is a work in progress.
.wikitable > caption,
.wikitable > tbody > tr > th {
background-color:var(--color-surface-1);
text-align:center
}
.wikitable > caption,
.wikitable > tbody > tr > * {
padding:0.4em 0.5em
}
.wikitable > tbody > tr > * {
border:1px solid var(--border-color-base)
}